﻿using System;
using System.Collections.Generic;
namespace App.Search
{
    public interface IIndexManager<T> where T: class
    {
        void CloseWriter();
        void DeleteIndex(int uniqueItemID);
        void IndexDocument(T obj, String appName);
        void UpdateIndex(T obj, String appName);
        ReIndexResult ReIndex();
    }

    public class ReIndexResult
    {
        public int FoundItems { get; set; }
        public int DeletedIndexFromLucene { get; set; }
        public int ReIndexedItems { get; set; }
        public int DeletedIndexFromDB { get; set; }
    }
    public class ProductResult
    {
        public int ID { get; set; }
        public String Title { get; set; }
    }
    public class SearchPayload
    {
        public String Keyword { get; set; }
        public List<SearchFilter> Filters { get; set; }
    }
    public class SearchFilter
    {
        public String SearchType { get; set; }
        public String SearchField { get; set; }
        public String Value { get; set; }
    }
}
